package com;

import java.io.IOException;
import java.io.InputStream;
import java.net.ServerSocket;
import java.net.Socket;

public class ReceiveTCP {//
    public static void main(String[] args) throws IOException {//
        ServerSocket  ss=new ServerSocket(10086);//
        Socket socket = ss.accept();//
        InputStream is = socket.getInputStream();//
        byte[] bytes=new byte[1024];//
        int ten = is.read(bytes);//
        System.out.println(new String(bytes,0,ten));//
        is.close();//
    }
}
